\(\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx\) [293]
Optimal result
Integrand size = 22, antiderivative size = 55 \[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=-\frac {d^2 \log (\cos (a+b x))}{b^3}+\frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}-\frac {d (c+d x) \tan (a+b x)}{b^2}
\]
[Out]
-d^2*ln(cos(b*x+a))/b^3+1/2*(d*x+c)^2*sec(b*x+a)^2/b-d*(d*x+c)*tan(b*x+a)/b^2
Rubi [A] (verified)
Time = 0.06 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of
steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {4494, 4269, 3556}
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=-\frac {d^2 \log (\cos (a+b x))}{b^3}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}
\]
[In]
Int[(c + d*x)^2*Sec[a + b*x]^2*Tan[a + b*x],x]
[Out]
-((d^2*Log[Cos[a + b*x]])/b^3) + ((c + d*x)^2*Sec[a + b*x]^2)/(2*b) - (d*(c + d*x)*Tan[a + b*x])/b^2
Rule 3556
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 4269
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Rule 4494
Int[((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.)*Tan[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> Simp[
(c + d*x)^m*(Sec[a + b*x]^n/(b*n)), x] - Dist[d*(m/(b*n)), Int[(c + d*x)^(m - 1)*Sec[a + b*x]^n, x], x] /; Fre
eQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}-\frac {d \int (c+d x) \sec ^2(a+b x) \, dx}{b} \\ & = \frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}-\frac {d (c+d x) \tan (a+b x)}{b^2}+\frac {d^2 \int \tan (a+b x) \, dx}{b^2} \\ & = -\frac {d^2 \log (\cos (a+b x))}{b^3}+\frac {(c+d x)^2 \sec ^2(a+b x)}{2 b}-\frac {d (c+d x) \tan (a+b x)}{b^2} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.65 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.20
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=\frac {b^2 (c+d x)^2 \sec ^2(a+b x)-2 b d (c+d x) \sec (a) \sec (a+b x) \sin (b x)-2 d^2 (\log (\cos (a+b x))+b x \tan (a))}{2 b^3}
\]
[In]
Integrate[(c + d*x)^2*Sec[a + b*x]^2*Tan[a + b*x],x]
[Out]
(b^2*(c + d*x)^2*Sec[a + b*x]^2 - 2*b*d*(c + d*x)*Sec[a]*Sec[a + b*x]*Sin[b*x] - 2*d^2*(Log[Cos[a + b*x]] + b*
x*Tan[a]))/(2*b^3)
Maple [C] (verified)
Result contains complex when optimal does not.
Time = 1.53 (sec) , antiderivative size = 149, normalized size of antiderivative = 2.71
| | |
method | result | size |
| | |
risch |
\(\frac {2 i d^{2} x}{b^{2}}+\frac {2 i d^{2} a}{b^{3}}+\frac {2 b \,d^{2} x^{2} {\mathrm e}^{2 i \left (x b +a \right )}+4 b c d x \,{\mathrm e}^{2 i \left (x b +a \right )}+2 b \,c^{2} {\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i c d \,{\mathrm e}^{2 i \left (x b +a \right )}-2 i d^{2} x -2 i d c}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )^{2}}-\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b^{3}}\) |
\(149\) |
derivativedivides |
\(\frac {\frac {a^{2} d^{2}}{2 b^{2} \cos \left (x b +a \right )^{2}}-\frac {a c d}{b \cos \left (x b +a \right )^{2}}-\frac {2 a \,d^{2} \left (\frac {x b +a}{2 \cos \left (x b +a \right )^{2}}-\frac {\tan \left (x b +a \right )}{2}\right )}{b^{2}}+\frac {c^{2}}{2 \cos \left (x b +a \right )^{2}}+\frac {2 c d \left (\frac {x b +a}{2 \cos \left (x b +a \right )^{2}}-\frac {\tan \left (x b +a \right )}{2}\right )}{b}+\frac {d^{2} \left (\frac {\left (x b +a \right )^{2}}{2 \cos \left (x b +a \right )^{2}}-\left (x b +a \right ) \tan \left (x b +a \right )-\ln \left (\cos \left (x b +a \right )\right )\right )}{b^{2}}}{b}\) |
\(165\) |
default |
\(\frac {\frac {a^{2} d^{2}}{2 b^{2} \cos \left (x b +a \right )^{2}}-\frac {a c d}{b \cos \left (x b +a \right )^{2}}-\frac {2 a \,d^{2} \left (\frac {x b +a}{2 \cos \left (x b +a \right )^{2}}-\frac {\tan \left (x b +a \right )}{2}\right )}{b^{2}}+\frac {c^{2}}{2 \cos \left (x b +a \right )^{2}}+\frac {2 c d \left (\frac {x b +a}{2 \cos \left (x b +a \right )^{2}}-\frac {\tan \left (x b +a \right )}{2}\right )}{b}+\frac {d^{2} \left (\frac {\left (x b +a \right )^{2}}{2 \cos \left (x b +a \right )^{2}}-\left (x b +a \right ) \tan \left (x b +a \right )-\ln \left (\cos \left (x b +a \right )\right )\right )}{b^{2}}}{b}\) |
\(165\) |
| | |
|
|
|
[In]
int((d*x+c)^2*sec(b*x+a)^2*tan(b*x+a),x,method=_RETURNVERBOSE)
[Out]
2*I*d^2/b^2*x+2*I*d^2/b^3*a+2*(b*d^2*x^2*exp(2*I*(b*x+a))+2*b*c*d*x*exp(2*I*(b*x+a))+b*c^2*exp(2*I*(b*x+a))-I*
d^2*x*exp(2*I*(b*x+a))-I*c*d*exp(2*I*(b*x+a))-I*d^2*x-I*d*c)/b^2/(exp(2*I*(b*x+a))+1)^2-d^2/b^3*ln(exp(2*I*(b*
x+a))+1)
Fricas [A] (verification not implemented)
none
Time = 0.26 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.56
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=\frac {b^{2} d^{2} x^{2} + 2 \, b^{2} c d x - 2 \, d^{2} \cos \left (b x + a\right )^{2} \log \left (-\cos \left (b x + a\right )\right ) + b^{2} c^{2} - 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right )}{2 \, b^{3} \cos \left (b x + a\right )^{2}}
\]
[In]
integrate((d*x+c)^2*sec(b*x+a)^2*tan(b*x+a),x, algorithm="fricas")
[Out]
1/2*(b^2*d^2*x^2 + 2*b^2*c*d*x - 2*d^2*cos(b*x + a)^2*log(-cos(b*x + a)) + b^2*c^2 - 2*(b*d^2*x + b*c*d)*cos(b
*x + a)*sin(b*x + a))/(b^3*cos(b*x + a)^2)
Sympy [F]
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=\int \left (c + d x\right )^{2} \tan {\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx
\]
[In]
integrate((d*x+c)**2*sec(b*x+a)**2*tan(b*x+a),x)
[Out]
Integral((c + d*x)**2*tan(a + b*x)*sec(a + b*x)**2, x)
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 988 vs. \(2 (53) = 106\).
Time = 0.31 (sec) , antiderivative size = 988, normalized size of antiderivative = 17.96
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*sec(b*x+a)^2*tan(b*x+a),x, algorithm="maxima")
[Out]
1/2*(c^2*tan(b*x + a)^2 - 2*a*c*d*tan(b*x + a)^2/b + a^2*d^2*tan(b*x + a)^2/b^2 + 4*(4*(b*x + a)*cos(2*b*x + 2
*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 + (2*(b*x + a)*cos(2*b*x + 2*a) + sin(2*b*x + 2*a))*cos(4*b*x + 4*a) +
2*(b*x + a)*cos(2*b*x + 2*a) + (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a) - 1)*sin(4*b*x + 4*a) - sin(2*
b*x + 2*a))*c*d/((2*(2*cos(2*b*x + 2*a) + 1)*cos(4*b*x + 4*a) + cos(4*b*x + 4*a)^2 + 4*cos(2*b*x + 2*a)^2 + si
n(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) + 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) + 1)*b) - 4
*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 + (2*(b*x + a)*cos(2*b*x + 2*a) + sin(2*b*x
+ 2*a))*cos(4*b*x + 4*a) + 2*(b*x + a)*cos(2*b*x + 2*a) + (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*a) - 1
)*sin(4*b*x + 4*a) - sin(2*b*x + 2*a))*a*d^2/((2*(2*cos(2*b*x + 2*a) + 1)*cos(4*b*x + 4*a) + cos(4*b*x + 4*a)^
2 + 4*cos(2*b*x + 2*a)^2 + sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) + 4*sin(2*b*x + 2*a)^2 + 4
*cos(2*b*x + 2*a) + 1)*b^2) + (8*(b*x + a)^2*cos(2*b*x + 2*a)^2 + 8*(b*x + a)^2*sin(2*b*x + 2*a)^2 + 4*(b*x +
a)^2*cos(2*b*x + 2*a) + 4*((b*x + a)^2*cos(2*b*x + 2*a) + (b*x + a)*sin(2*b*x + 2*a))*cos(4*b*x + 4*a) - (2*(2
*cos(2*b*x + 2*a) + 1)*cos(4*b*x + 4*a) + cos(4*b*x + 4*a)^2 + 4*cos(2*b*x + 2*a)^2 + sin(4*b*x + 4*a)^2 + 4*s
in(4*b*x + 4*a)*sin(2*b*x + 2*a) + 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) + 1)*log(cos(2*b*x + 2*a)^2 + sin
(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1) + 4*((b*x + a)^2*sin(2*b*x + 2*a) - b*x - (b*x + a)*cos(2*b*x + 2*a)
- a)*sin(4*b*x + 4*a) - 4*(b*x + a)*sin(2*b*x + 2*a))*d^2/((2*(2*cos(2*b*x + 2*a) + 1)*cos(4*b*x + 4*a) + cos
(4*b*x + 4*a)^2 + 4*cos(2*b*x + 2*a)^2 + sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) + 4*sin(2*b*
x + 2*a)^2 + 4*cos(2*b*x + 2*a) + 1)*b^2))/b
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 4331 vs. \(2 (53) = 106\).
Time = 1.10 (sec) , antiderivative size = 4331, normalized size of antiderivative = 78.75
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*sec(b*x+a)^2*tan(b*x+a),x, algorithm="giac")
[Out]
1/2*(b^2*d^2*x^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*d^2*x^2*tan(1/2
*b*x)^4*tan(1/2*a)^2 + 2*b^2*d^2*x^2*tan(1/2*b*x)^2*tan(1/2*a)^4 + b^2*c^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 4*b^2
*c*d*x*tan(1/2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*b^3*tan(1/2*b*x)^3*tan(1/2*a) + 20*b^3*tan(1/2*b*x)^2*tan(1/2*a)^2 + 8*b^3*tan(1/2*b*x)*tan(1/2*a)^3 + b^
3*tan(1/2*a)^4 - 2*b^3*tan(1/2*b*x)^2 - 8*b^3*tan(1/2*b*x)*tan(1/2*a) - 2*b^3*tan(1/2*a)^2 + b^3)
Mupad [B] (verification not implemented)
Time = 27.52 (sec) , antiderivative size = 150, normalized size of antiderivative = 2.73
\[
\int (c+d x)^2 \sec ^2(a+b x) \tan (a+b x) \, dx=-\frac {\frac {{\left (c+d\,x\right )}^2}{b}-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,{\left (c+d\,x\right )}^2}{b}}{2\,{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,4{}\mathrm {i}+b\,x\,4{}\mathrm {i}}+1}+\frac {d^2\,x\,2{}\mathrm {i}}{b^2}+\frac {b\,c^2+2\,b\,c\,d\,x-c\,d\,2{}\mathrm {i}+b\,d^2\,x^2-d^2\,x\,2{}\mathrm {i}}{b^2\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}+1\right )}-\frac {d^2\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+1\right )}{b^3}
\]
[In]
int((tan(a + b*x)*(c + d*x)^2)/cos(a + b*x)^2,x)
[Out]
(d^2*x*2i)/b^2 - ((c + d*x)^2/b - (exp(a*2i + b*x*2i)*(c + d*x)^2)/b)/(2*exp(a*2i + b*x*2i) + exp(a*4i + b*x*4
i) + 1) + (b*c^2 - c*d*2i - d^2*x*2i + b*d^2*x^2 + 2*b*c*d*x)/(b^2*(exp(a*2i + b*x*2i) + 1)) - (d^2*log(exp(a*
2i)*exp(b*x*2i) + 1))/b^3